package com.ruoyi.client.controller;

import com.ruoyi.client.service.GoodsServiceImpl;
import com.ruoyi.client.yu.common.entity.app.vo.GoodsMenuVO;
import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.common.core.domain.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@Api(tags = "商品服务")
@RestController("clientGoodsController")
@RequestMapping("/goods")
public class GoodsController {
    @Resource
    private GoodsServiceImpl goodsService;

    @ApiOperation("获取要显示的商品菜单列表")
    @GetMapping("/goodsMenu/list")
    @Anonymous
    public R<List<GoodsMenuVO>> getGoodsMenuDetailList() {
        return R.ok(goodsService.getGoodsMenuDetailList());
    }

}

